
print("lua script func.lua have been load ")
avg, sum = average(10, 20, 30, 40, 50)
print("The average is ", avg)
print("The sum is ", sum)


--file: test.lua
local tTest = {
    gdp = 1234,
    info = "this is test about exchange table data!",
    task = {a = 12, b = 23, c = 34, d = 45},
};

--local test_while_table = {one=1,[2]='two',three=3}
local ret = WhileReadTable(tTest)
for k,v in ipairs(ret) do
	print(k,v)
end
--local tRet = TestTable(test_while_table);
--print(eRet.key)
--
--printTable(tRet);
--tRet.key.capi();
--
--
--function add(x,y)
--    return x+y+x*y
--end
--
--function printTable(t, n)
--    if "table" ~= type(t) then
--        return 0;
--    end
--    n = n or 0;
--    local str_space = "";
--    for i = 1, n do
--        str_space = str_space.."  ";
--    end
--    print(str_space.."{");
--    for k, v in pairs(t) do
--        local str_k_v = str_space.."  ["..tostring(k).."] = ";
--        if "table" == type(v) then
--            print(str_k_v);
--            printTable(v, n + 1);
--        else
--            str_k_v = str_k_v..tostring(v);
--            print(str_k_v);
--        end
--    end
--    print(str_space.."}");
--end

